package edu.hda.pt.client;

/**
 * The class Config contains of all configurations.
 * 
 * @author Marc Hammerton
 * 
 */
public final class Config {

	// Test Parameters

	/**
	 * Number of method calls as warm up
	 */
	public static final int WARM_UP_METHOD_CALLS = 1000;

	/**
	 * Number of clients simultaneously connected to the server
	 */
	public static int[] NR_CLIENTS = { 1 };

	/**
	 * Number of calls for the test method
	 */
	public static int METHOD_CALLS = 1000;

	/**
	 * Determines how long requests are sent
	 */
	public static final long TIME_SPAN = 60000;

	/**
	 * Possible data sizes in the messages
	 */
	public static final int[] DATA_SIZES = { 1024, 10240, 102400 };

	/**
	 * Time span while the client already receives frames from the server but
	 * they are not counted
	 */
	public static final int STREAM_WARMUP = 5 * 1000;

	/**
	 * Time span for the measurement of the streaming test
	 */
	public static final int STREAM_TIMESPAN = 30 * 1000;

	/**
	 * Frame sizes for the streaming tests
	 */
	public static final int[] STREAM_FS = { 20480, 40960, 81920, 204800 };

	/**
	 * Time span for the measurement of the CPU utilization and memory usage
	 * tests
	 */
	public static final long CPU_AND_MEM_TEST_TIME = (60 * 1000);

	/**
	 * Data sizes for the CPU utilization and memory usage tests
	 */
	public static final int[] CPU_AND_MEM_TEST_DATA_SIZES = { 10, 100, 1024 };

	// Server-Method codes
	/**
	 * Code indicating the message contains a String value
	 */
	public static final short HANDLESTRING = 1;

	/**
	 * Code indicating the message contains a Integer value
	 */
	public static final short HANDLEINTEGER = 2;

	/**
	 * Code indicating the message contains a Long value
	 */
	public static final short HANDLELONG = 3;

	/**
	 * Code indicating the message contains a Boolean value
	 */
	public static final short HANDLEBOOL = 4;

	/**
	 * Code indicating the message contains an object
	 */
	public static final short HANDLEOBJECT = 5;

	/**
	 * Code indicating the message contains a Byte value
	 */
	public static final short HANDLEBYTES = 6;

	/**
	 * Code indicating the message contains a request for starting a stream
	 */
	public static final short HANDLESTREAM_START = 7;

	/**
	 * Code indicating the message contains a notification that the stream has
	 * started
	 */
	public static final short HANDLESTREAM_STARTED = 8;
	
	/**
	 * Code indicating the message contains a request for stopping the stream
	 */
	public static final short HANDLESTREAM_STOP = 9;

	
	// Test-Data

	/**
	 * Constant for a short String (5 words)
	 */
	public static final String SHORT_STRING = "Lorem ipsum dolor sit amet";

	/**
	 * Constant for a long String (1000 words)
	 */
	public static final String LONG_STRING = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce vehicula "
			+ "blandit massa. Aenean eget eros eu urna lobortis pretium. Pellentesque massa. In at tellus at arcu placerat "
			+ "porttitor. Duis in massa ac elit fringilla semper. Vestibulum venenatis neque non eros. Phasellus ut quam in "
			+ "dolor consequat sollicitudin. Donec egestas mauris vel enim. Donec arcu dui, rutrum iaculis, tincidunt quis, "
			+ "pretium et, ligula. Praesent mauris erat, dapibus ut, pulvinar at, sollicitudin et, elit. Sed eu ligula. Quisque "
			+ "sit amet ante non elit sagittis condimentum. Nulla a erat. Aenean iaculis ante vitae nisl. In hac habitasse "
			+ "platea dictumst. Etiam semper, leo eget ornare adipiscing, lorem turpis sollicitudin eros, non hendrerit massa "
			+ "libero ut odio. Donec eget neque vitae ipsum placerat pulvinar. Nulla tristique augue a risus. Sed rutrum, odio "
			+ "ac porta pulvinar, eros lorem hendrerit turpis, et fermentum arcu arcu nec mauris. Cras quis risus ac nibh lacinia "
			+ "porttitor. Nulla eget augue. Mauris eleifend sem posuere dolor. Aliquam sollicitudin volutpat arcu. Vestibulum "
			+ "mauris. Aenean non dui. Donec ut orci eget neque consequat rhoncus. Ut dui neque, lobortis sed, vulputate vitae, "
			+ "cursus et, urna. Aenean adipiscing felis ut lacus. Maecenas nec lorem vitae nibh lacinia vulputate. Duis urna. "
			+ "Proin vulputate magna vitae orci. Suspendisse non metus eget ipsum sollicitudin blandit. Nullam sollicitudin dolor "
			+ "quis magna. Sed elementum semper leo. Integer turpis arcu, ullamcorper non, congue ut, adipiscing feugiat, mauris. "
			+ "Nullam pulvinar vestibulum felis. Fusce in enim. Etiam aliquet. Nullam massa arcu, varius a, imperdiet in, posuere "
			+ "at, magna. Aliquam fermentum erat ac diam. Donec porttitor aliquet justo. Phasellus lacinia, ante sed sollicitudin "
			+ "tincidunt, urna velit tincidunt mi, in sodales massa nibh eu turpis. Nulla pharetra eros rutrum arcu. Fusce "
			+ "volutpat convallis purus. Nullam mattis enim sed mauris. Aliquam bibendum felis in felis. Aliquam hendrerit."
			+ " Vestibulum in ante id eros commodo dapibus. Donec lacinia pulvinar purus. Cras eleifend, erat in ultricies "
			+ "viverra, arcu nisi auctor nisl, sed gravida nunc nibh sed elit. Quisque rhoncus felis sit amet ante. Praesent "
			+ "lacus. Quisque sed diam sed ligula cursus eleifend. Vivamus in nibh. Sed velit. Integer vehicula risus vel urna. "
			+ "Ut eget arcu non mauris viverra tincidunt. Pellentesque at ligula nec neque interdum scelerisque. Nulla facilisi. "
			+ "Suspendisse ornare lorem nec quam. Pellentesque consequat, elit vitae varius rutrum, dolor ipsum ornare erat, ut "
			+ "sollicitudin arcu odio eget urna. Maecenas facilisis congue nibh. Vivamus viverra. Pellentesque habitant morbi "
			+ "tristique senectus et netus et malesuada fames ac turpis egestas. Nullam placerat, nunc vitae interdum sagittis, "
			+ "diam purus blandit nibh, at malesuada lacus diam in sem. Etiam lacinia elit quis libero. Cras viverra condimentum "
			+ "nisi. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nam "
			+ "adipiscing. Maecenas dignissim. Phasellus libero arcu, accumsan nec, ultricies sit amet, pellentesque sit amet, "
			+ "justo. Vivamus diam. Nunc vestibulum. Nam quam nisl, lobortis et, suscipit et, tristique in, quam. Pellentesque "
			+ "ut elit. Quisque enim purus, fringilla sit amet, sodales eget, rutrum eu, lectus. Sed a augue. Proin turpis risus, "
			+ "aliquet facilisis, tincidunt quis, laoreet vel, metus. Aenean pharetra mattis risus. Aenean gravida. ";

	/**
	 * Constant for an Integer value
	 */
	public static final int INT_PRIM = 15;
	
	/**
	 * Constant for a Long value
	 */
	public static final long LONG_PRIM = 5556547842L;
	
	/**
	 * Constant for a Boolean value
	 */
	public static final boolean BOOL_PRIM = true;

	/**
	 * Default constructor 
	 */
	private Config() {
	}
}
